package cn.iocoder.yudao.module.dine.config.pojo.dto;

import cn.iocoder.yudao.framework.business.basic.pojo.dto.SaveDTO;
import cn.iocoder.yudao.framework.region.bo.AddressLiteBO;
import cn.iocoder.yudao.framework.validation.InEnumValue;
import cn.iocoder.yudao.module.api.product.spu.enums.ProductDeliveryScopeEnum;
import cn.iocoder.yudao.module.api.product.spu.enums.ProductPriceModeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * <pre>
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * 数据传输对象
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * </pre>
 *
 * @author 山野羡民（1032694760@qq.com）
 * @since 2025/08/01
 */
@Data
public class DineConfigSaveDTO extends SaveDTO {

    @Schema(description = "计价模式：1-按单品计价、2-按称量计价")
    @InEnumValue(ProductPriceModeEnum.class)
    private Integer priceMode;

    @Schema(description = "计价单位，按称量计价必填")
    private String weightUnitName;

    @Schema(description = "荤菜计价单价，单位分，按称量计价必填")
    private Integer meatUnitPrice;

    @Schema(description = "素菜计价单价，单位分，按称量计价必填")
    private Integer vegetableUnitPrice;

    @Schema(description = "最低消费金额，单位分")
    private Integer consumeThresholdPrice;

    @Schema(description = "支持的配送方式：0-堂食、3-外卖、4-自取")
    private List<Integer> deliveryTypes;

    @Schema(description = "配送范围：0-指定半径、1-指定地址")
    @InEnumValue(ProductDeliveryScopeEnum.class)
    private Integer deliveryScope;

    @Schema(description = "可配送半径，单位为米")
    private Integer deliveryRadius;

    @Schema(description = "可配送地址，精确到楼栋或门牌号，JSON数组格式", example = """
            [
                {
                    "countyCode": "520102",
                    "detailAddress": "花果园1期7栋"
                },
                {
                    "countyCode": "520102",
                    "detailAddress": "铁建城"
                }
            ]
            """)
    private List<AddressLiteBO> deliveryAddresses;

    @Schema(description = "配送费，单位分，支持外卖时必填")
    private Integer deliveryPrice;

    @Schema(description = "免配送费门槛金额，单位分，支持外卖时必填")
    private Integer deliveryFreeThresholdPrice;

    @Schema(description = "主食要求，是否强提醒")
    private Boolean requireStapleFood;

    @Schema(description = "餐盒要求，是否强提醒")
    private Boolean requireKitchenware;

    @Schema(description = "单份重量，单位为克")
    private Integer singleMaxWeight;

    @Schema(description = "每日最大接单量")
    private Integer maxDailyOrders;

}